package org

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/dto/base"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/org"
	pb "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/proto/micro_gfyx_oppty_service_proto/micro-gfyx-oppty-service/base"
)

type OrgServiceIface interface {
	// Save 新增/更新组织数据
	Save(ctx context.Context, org *org.GfyOrganizationPo, orgAreaCodes []string) (int64, error)
	// Delete 删除组织数据并且交接工作
	Delete(ctx context.Context, orgId int64) error
	// List 组织列表
	List(ctx context.Context) ([]*org.OrgListItem, error)
	// ImportOrgs 导入组织数据
	ImportOrgs(ctx context.Context, orgList []*base.ImportOrgDto) (*pb.ImportOrgResponse, error)
	// SyncAreaPermission 从建模同步组织权限
	SyncAreaPermission(ctx context.Context, orgGuid string, areaCodes []string, userGuids []string) error
}
